package com.teamall.web.app.db.dao.mapper;

        import org.apache.ibatis.annotations.Select;

/**
 * ${DESCRIPTION}
 *
 * @author
 * @create 2017-09-05 16:03
 **/
public interface IAppCommonMapper {
    @Select("select family_id from FAMILY_INFO where aid_main_staff=#{userObjId}")
    Integer qryFamilyByUserObjId(Integer userObjId);
    @Select("SELECT  FAMILY_ID FROM FAMILY_MEMBER WHERE FAMILY_MEMEBER_ID=#{userObjId}")
    Integer qryFamilyMemberByUserObjId(Integer userObjId);
    @Select("select aid_main_staff from FAMILY_INFO where family_id=#{familyId}")
    Integer qryAidMainStaffbyFamilyId(Integer familyId);
    @Select("SELECT count(1) FROM FAMILY_HELP where HELP_STATE = 0 and HELP_STAFF =#{userId}")
    Integer getNotSolveHelpByHelpId(Integer userId);
    @Select("SELECT count(1) FROM FAMILY_HELP where HELP_STATE = 0 and FEEDBACK_STAFF =#{userId}")
    Integer getNotSolveHelpByFeedBackId(Integer userId);
    @Select("select count(1) from PROJECT_FAMILY_RELATED where project_id=#{projectId}")
    Integer getBenefitCountByProjectId(Integer projectId);
}
